Theme UIのTips
Theme UI
公式紹介文
Theme UI is a library for creating themeable user interfaces based on constraint-based design principles. Build custom component libraries, design systems, web applications, Gatsby themes, and more with a flexible API for best-in-class developer ergonomics.
作者さん
Jxnblkさん
Gatsby社に勤務されているとのこと。
→ pluginもあり(安直だが)Gatsbyで使うと親和性が高そう。
今回はReact × Typescriptのポートフォリオで利用しました。
-
書いたブログ + ブログ書くほどではないが得た知見。
導入時の引っ掛かりポイント
Theme UIをReact×TypeScriptのプロジェクトで使う。
元々用意されたデザイン(Preset)の導入方法
Theme UIのPresetのデザインの導入方法
レスポンシブ
レスポンシブについては公式サイトに説明があります。
公式情報 Responsive Values
三段階で指定可能 左から小 → 大のサイズ
例)
code:ex.tsx
<div sx={{'width': '70%', null, '50%'}}>
~ 省略 ~
</div>